/*全局按钮样式*/
@import './color-variables.scss';

/*混入通过 @mixin 类名 后面跟任选的arguments参数的方式定义一个 Mixins 模块，然后添加任何你想重复使用的样式*/

/*自定义element默认按钮颜色，覆盖原有样式*/
@mixin defaultColorBtn($color,$darkColor) {
  color: #FFFFFF !important;
  background-color: $darkColor !important;
  border-color: $darkColor !important;
  &:is(.is-disabled),&:hover,&:focus {
    color: #FFFFFF !important;
    background-color: $color !important;
    border-color: $color !important;
  }
}

/*自定义element朴素按钮颜色，覆盖原有样式*/
@mixin plainColorBtn($lightColor,$darkColor) {
  color: $darkColor !important;
  background-color: $lightColor !important;
  border-color: $darkColor !important;
  &:not(.is-disabled):hover,&:focus{
    color: #FFFFFF !important;
    background-color: $darkColor !important;;
    border-color: #FFFFFF !important;;
  }
}

/*自定义按钮颜色，覆盖原有样式*/
@mixin colorBtn($color) {
  background: $color;

  &:hover {
    color: $color;

    &:before,
    &:after {
      background: $color;
    }
  }
}
/*------------------------------------element按钮样式覆盖 class="xxx-btn"-------------------------------------------*/
/*灰色*/
.gray-btn {
  @include defaultColorBtn($middleGray,$darkGray)
}

.plain-gray-btn {
  @include plainColorBtn($lightGray,$darkGray)
}

/*粉色*/
.pink-btn {
  @include defaultColorBtn($middlePink,$darkPink)
}

.plain-pink-btn {
  @include plainColorBtn($lightPink,$darkPink)
}

/*红色*/
.red-btn {
  @include defaultColorBtn($middleRed,$darkRed)
}

.plain-red-btn {
  @include plainColorBtn($lightRed,$darkRed)
}

/*橘色*/
.orange-btn {
  @include defaultColorBtn($middleOrange,$darkOrange)
}

.plain-orange-btn {
  @include plainColorBtn($lightOrange,$darkOrange)
}

/*黄色*/
.yellow-btn {
  @include defaultColorBtn($middleYellow,$darkYellow)
}

.plain-yellow-btn {
  @include plainColorBtn($lightYellow,$darkYellow)
}

/*绿色*/
.green-btn {
  @include defaultColorBtn($middleGreen,$darkGreen)
}

.plain-green-btn {
  @include plainColorBtn($lightGreen,$darkGreen)
}

/*蓝色*/
.blue-btn {
  @include defaultColorBtn($middleBlue,$darkBlue)
}

.plain-blue-btn {
  @include plainColorBtn($lightBlue,$darkBlue)
}

/*紫色*/
.purple-btn {
  @include defaultColorBtn($middlePurple,$darkPurple)
}

.plain-purple-btn {
  @include plainColorBtn($lightPurple,$darkPurple)
}

/*------------------------------------按钮样式覆盖 class="xxx-btn"-------------------------------------------*/
/*蓝色*/
.blue-btn {
  @include colorBtn($blue)
}
/*浅蓝色*/
.light-blue-btn {
  @include colorBtn($light-blue)
}
/*红色*/
.red-btn {
  @include colorBtn($red)
}
/*粉色*/
.pink-btn {
  @include colorBtn($pink)
}
/*绿色*/
.green-btn {
  @include colorBtn($green)
}
/*天蓝色*/
.light-blue-btn {
  @include colorBtn($skyBlue)
}
/*黄色*/
.yellow-btn {
  @include colorBtn($yellow)
}

/*大按钮*/
.big-btn {
  font-size: 14px;
  color: #fff;
  padding: 14px 36px;
  border-radius: 8px;
  border: none;
  outline: none;
  transition: 600ms ease all;
  position: relative;
  display: inline-block;

  &:hover {
    background: #fff;

    &:before,
    &:after {
      width: 100%;
      transition: 600ms ease all;
    }
  }

  &:before,
  &:after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    height: 2px;
    width: 0;
    transition: 400ms ease all;
  }

  &::after {
    right: inherit;
    top: inherit;
    left: 0;
    bottom: 0;
  }
}

/*自定义按钮*/
.custom-button {
  display: inline-block;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  background: #fff;
  color: #fff;
  -webkit-appearance: none;
  text-align: center;
  box-sizing: border-box;
  outline: 0;
  margin: 0;
  padding: 10px 15px;
  font-size: 14px;
  border-radius: 4px;
}
